<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>信用卡攻略</title>

    <!-- styles here -->
    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../css/Public_CSS.css">
    <link rel="stylesheet" href="../css/swiper.min.css">
    <link rel="stylesheet" href="../css/mui.min.css">
    <link rel="stylesheet" href="../css/style.css">
</head>

<body>
    <div id="app" class="strategy-page1">
        <div class="banner-back">
            <span onclick="window.history.back()">
                <i>返回</i>
            </span>信用卡攻略
        </div>
        <div class="hot">
            <h1>热门话题</h1>
            <div class="img-container">
                <div class="swiper-wrapper">
                    <a href="" class="swiper-slide">
                        <img src="../img/banner/xykgl_banner.png" alt="1">
                    </a>
                    <a href="" class="swiper-slide">
                        <img src="../img/banner/xyk_banner1.png" alt="2">
                    </a>
                    <a href="" class="swiper-slide">
                        <img src="../img/banner/xyk_banner2.png" alt="3">
                    </a>
                </div>
                <div class="dots"></div>
            </div>
        </div>
        <div class="news">
            <h1>新闻资讯</h1>
            <div class="news-wrap">
                <a v-for="item in datas" class="news-block" :href="item.link">
                    <div>
                        <h1 v-html="item.title"></h1>
                        <p>
                            <img src="../img/icon/external-link-symbol.svg" alt="转">
                            <span class="push">40</span>
                            <img src="../img/icon/like.svg" alt="赞">
                            <span class="like">253</span>
                        </p>
                    </div>
                    <div>
                        <img :src="item.image" :alt="item.title">
                    </div>
                </a>
            </div>
        </div>
    </div>

    <!-- scripts here -->
    <script src="../js/common.js" type="text/javascript"></script>
    <script src="../js/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/swiper.jquery.min.js"></script>
    <script src="../js/vue.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../public/js/loan/mui.min.js"></script>
    <script>
        $(function () {
            vm.loadDatas();
            var swiper = new Swiper('.img-container', {
                pagination: '.dots',
                paginationClickable: true,
                loop: true,
                autoplayDisableOnInteraction: false,
                autoplay: 5000,
                iOSEdgeSwipeDetection: true
            });
        });
        var vm = new Vue({
            el: "#app",
            data: {
                datas: []
            },
            methods: {
                loadDatas: function () {
                    $.ajax({
                        url: "/thmlfApi/avs/yb/raiderCard?appId=" + appId(),
                        dataType: "JSON",
                        success: function (r) {
                            if (r.code == 200)
                                vm.datas = r.result;
                            else
                                alert(r.message);
                        },
                        error: function (e) {
                            console.log("request error", e);
                            mui.alert("请求失败");
                        }
                    });
                }
            }
        });
    </script>
</body>

</html>